#coding: utf-8
#Created: 02.03.12 12:57

import urllib.request, urllib.parse
import xml.dom.minidom as XML

requestString = "http://api.bing.net/xml.aspx?"\
+ 'AppId=' + '9C6282834&'\
+ 'query=' +urllib.parse.quote_plus('search string')\
+ '&image.filters=Size:Large'\
+ '&Sources=Image'\
+ '&Version=2.0'\
+ '&Market=en-us'\
+ '&Adult=Moderate'\
+ '&Image.Count=10'\
+ '&Image.Offset=00'

print (requestString)

response = urllib.request.urlopen(requestString)
xmlDoc = XML.parseString(response.read().decode('utf-8'))

links = xmlDoc.getElementsByTagName('mms:MediaUrl')

for i in links:
    print (i.firstChild.data.strip())


